home *** CD-ROM | disk | FTP | other *** search
Wrap
//============================================================================ // control/server/initialize.cs // // server control initialization module for 3D2E emaga6 sample game // // Copyright (c) 2003 by Kenneth C. Finney. //============================================================================ $Pref::Server::AdminPassword = ""; $Pref::Server::BanTime = 1800; $Pref::Server::ConnectionError = "You do not have the correct version of 3D2E client or the related art needed to play on this server. This is the server for Chapter 6. Please check that chapter for directions."; $Pref::Server::FloodProtectionEnabled = 1; $Pref::Server::Info = "3D Game Programming All-In-One, Second Edition by Kenneth C. Finney."; $Pref::Server::KickBanTime = 300; $Pref::Server::MaxChatLen = 120; $Pref::Server::MaxPlayers = 64; $Pref::Server::Name = "3D2E Book - Chapter 6 Server"; $Pref::Server::Password = ""; $Pref::Server::Port = 28000; $Pref::Server::RegionMask = 2; $Pref::Server::TimeLimit = 20; $Pref::Net::LagThreshold = "400"; $pref::Net::PacketRateToClient = "10"; $pref::Net::PacketRateToServer = "32"; $pref::Net::PacketSize = "200"; $pref::Net::Port = 28000; function InitializeServer() //---------------------------------------------------------------------------- // Prepare some global server information & load the game-specific module //---------------------------------------------------------------------------- { Echo("\n++++++++++++ Initializing module: emaga6 server ++++++++++++"); $Server::GameType = "3D2E"; $Server::MissionType = "Emaga6"; $Server::Status = "Unknown"; $Server::TestCheats = true; // Specify where the mission files are. $Server::MissionFileSpec = "*/maps/*.mis"; InitBaseServer(); // basic server features defined in the common modules // Load up game server support script Exec("./server.cs"); } function InitializeDedicatedServer() //------------------------------------------------------------------------ // Dedicated server will need a windows console and an initial start // mission. It always launches in multiplayer mode, of course. //------------------------------------------------------------------------ { EnableWinConsole(true); Echo("\n--------- Starting Dedicated Server ---------"); // Make sure this variable reflects the correct state. $Server::Dedicated = true; // The server isn't started unless a mission has been specified. if ($missionArg !$= "") { CreateServer("MultiPlayer", $missionArg); } else Echo("No map specified (use -map filename)"); } function onNeedRelight() // stub routine to stop console error spam { }